cmake_minimum_required(VERSION 3.10)
project(CPUUsageControl)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 添加可执行文件
add_executable(cpu_usage_50 cpu_usage_50.cpp)
add_executable(cpu_core_usage cpu_core_usage.cpp)

# 如果在 Windows 上，添加 pdh 库
if(WIN32)
    target_link_libraries(cpu_usage_50 pdh)
    target_link_libraries(cpu_core_usage pdh)
endif()
